package ru.papergames.model.binsocket.packets.response
{
	import ru.papergames.model.binsocket.data.ExtByteArray;
	import ru.papergames.model.binsocket.packets.SocketResponse;
	import ru.papergames.model.vo.PlayerVO;
	

	public class BattleMemberInfoAboutHimselfResponse extends SocketResponse
	{		
		public static const NOTIFICATION:String = 'BattleMemberInfoAboutHimselfResponse';
		
		public var battleOrderId:uint;		
		public var player:PlayerVO;

		
		public function BattleMemberInfoAboutHimselfResponse(bytes:ExtByteArray)
		{
			super(bytes);
		}
		
		override protected function decode():void {
			battleOrderId = binaryData.readUnsignedInt();
			
			player = new PlayerVO();
			player.isMine = true;
			
			player.teamId = binaryData.readUnsignedByte();
			player.coloreId = binaryData.readUnsignedShort();
			player.isPcPlayer = binaryData.readBoolean();
			player.playerId = binaryData.readLong();
			player.username = binaryData.readUTF();
			player.level = binaryData.readUnsignedShort();		
			
		}
		
		override public function getNotification():String {
			return NOTIFICATION;
		}
	}
}